An attribute field called "Spice" is predefined for devices and the design itself. If the standard Report forms are used, any text data entered in this field is included in the output file, as follows:
• for devices, the data is appended to the corresponding device line in the file. E.g. entering the value "SIN(0.0 0.01V)" in the Spice field for a voltage source would create the following line in the SPICE output file:
V1 0 VPLUS SIN(0.0 0.01V)
• for the design, the contents of the field is inserted verbatim at the front of the file. This can be used to enter parameter lines, model definitions, etc. Multiple lines can be entered if desired.
SPICE Name Prefix
Library parts in the SPICE Devices standard library have a field called "Name.Spice" defined. This field contains the standard SPICE name prefix letter for that type. To use this prefix, use the Design Attributes command to set the PrefixField field to "Name.Spice".
Hierarchical Designs for SPICE
Hierarchical designs created in Pure or Physical hierarchy mode will be written to the SPICE file using the SUBCKT statement. See the SPICE sample designs provided with the package.
Pin Ordering for SPICE
In the SPICE netlist format, the functions of device pins are determined by the order of appearance in the file. Therefore, the order of placement of pins on a device symbol is extremely important for this usage. Pins are normally placed in the order they appear when the symbol is opened using the DevEditor, although this can be modified using the Report tool's DEVPINSEQUENCE facility and the PinSequence attribute field, described below.
Discrete Component Symbols
Discrete devices in the standard SPICE Devices library provided with DesignWorks have their pin order preset for SPICE usage. If you are using any other discrete component symbols, or creating your own, check the pin order carefully.
Digital Component Symbols
Unfortunately, there is no established standard pin ordering for digital simulation extensions to SPICE. The standard DesignWorks digital libraries are not set up to work with SPICE-based digital simulators, although most gate-level parts are created using the natural order of inputs first, then outputs.
In order to use digital components with a SPICE format, it will be necessary to either:
• enter a list of the pins to be listed in the file in the device's PinSequence attribute field, OR
• create a special symbol with the pins in the correct order, OR
• obtain libraries of symbols specially created for use with your simulator.
Using the PinSequence Field
The standard SPICE report forms provided with DesignWorks make use of the PinSequence attribute field to specify pin ordering for digital parts. To specify pin ordering, it is first necessary to know the names of all the pins on the device in question. This can be obtained using the Get Info command, the Pin Info command or by opening the part type using the DevEditor.
For example, the 74ALS74 part has the following pin list when viewed in the DevEditor:
To specify an alternate order for output, you could enter the following string into the PinSequence field for the device:
/CLR,D,CLK,/PRE,Q,/Q
Only the items entered in this list will appear, i.e. not all pins need be listed and some can be listed more than once, if desired. The pin names must match exactly the list as seen in the DevEditor, including case. Unrecognized names are ignored by the Report tool.
NOTE: Entries in the PinSequence field are effective only if specifically enabled by the selected Report form file. The SPICE form files provided with DesignWorks include this entry. If you are creating your own format, refer to the description of the $DEVPINSEQUENCE format command.